home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / SETUP / US / CBUILDER / DATA.Z / GL.H < prev    next >
C/C++ Source or Header  |  1997-02-13  |  53KB  |  1,145 lines

  1. /*++ BUILD Version: 0004    // Increment this if a change has global effects
  2.  
  3. Module Name:
  4.  
  5.     gl.h
  6.  
  7. Abstract:
  8.  
  9.     Procedure declarations, constant definitions and macros for the OpenGL
  10.     component.
  11.  
  12. --*/
  13.  
  14. /*
  15.  *      C/C++ Run Time Library - Version 8.0
  16.  *
  17.  *      Copyright (c) 1994, 1997 by Borland International
  18.  *      All Rights Reserved.
  19.  *
  20.  */
  21.  
  22. #ifndef __GL_H__
  23. #define __GL_H__
  24. #define __GL_H
  25. #pragma option -b
  26.  
  27. /*
  28. ** Copyright 1991-1993, Silicon Graphics, Inc.
  29. ** All Rights Reserved.
  30. ** 
  31. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  32. ** the contents of this file may not be disclosed to third parties, copied or
  33. ** duplicated in any form, in whole or in part, without the prior written
  34. ** permission of Silicon Graphics, Inc.
  35. ** 
  36. ** RESTRICTED RIGHTS LEGEND:
  37. ** Use, duplication or disclosure by the Government is subject to restrictions
  38. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  39. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  40. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  41. ** rights reserved under the Copyright Laws of the United States.
  42. */
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48. typedef unsigned long GLenum;
  49. typedef unsigned char GLboolean;
  50. typedef unsigned long GLbitfield;
  51. typedef signed char GLbyte;
  52. typedef short GLshort;
  53. typedef long GLint;
  54. typedef long GLsizei;
  55. typedef unsigned char GLubyte;
  56. typedef unsigned short GLushort;
  57. typedef unsigned long GLuint;
  58. typedef float GLfloat;
  59. typedef float GLclampf;
  60. typedef double GLdouble;
  61. typedef double GLclampd;
  62. typedef void GLvoid;
  63.  
  64.  
  65. /*************************************************************/
  66.  
  67. /* AccumOp */
  68. #define GL_ACCUM                            0x0100
  69. #define GL_LOAD                             0x0101
  70. #define GL_RETURN                           0x0102
  71. #define GL_MULT                             0x0103
  72. #define GL_ADD                              0x0104
  73.  
  74. /* AlphaFunction */
  75. #define GL_NEVER                            0x0200
  76. #define GL_LESS                             0x0201
  77. #define GL_EQUAL                            0x0202
  78. #define GL_LEQUAL                           0x0203
  79. #define GL_GREATER                          0x0204
  80. #define GL_NOTEQUAL                         0x0205
  81. #define GL_GEQUAL                           0x0206
  82. #define GL_ALWAYS                           0x0207
  83.  
  84. /* AttribMask */
  85. #define GL_CURRENT_BIT                      0x00000001
  86. #define GL_POINT_BIT                        0x00000002
  87. #define GL_LINE_BIT                         0x00000004
  88. #define GL_POLYGON_BIT                      0x00000008
  89. #define GL_POLYGON_STIPPLE_BIT              0x00000010
  90. #define GL_PIXEL_MODE_BIT                   0x00000020
  91. #define GL_LIGHTING_BIT                     0x00000040
  92. #define GL_FOG_BIT                          0x00000080
  93. #define GL_DEPTH_BUFFER_BIT                 0x00000100
  94. #define GL_ACCUM_BUFFER_BIT                 0x00000200
  95. #define GL_STENCIL_BUFFER_BIT               0x00000400
  96. #define GL_VIEWPORT_BIT                     0x00000800
  97. #define GL_TRANSFORM_BIT                    0x00001000
  98. #define GL_ENABLE_BIT                       0x00002000
  99. #define GL_COLOR_BUFFER_BIT                 0x00004000
  100. #define GL_HINT_BIT                         0x00008000
  101. #define GL_EVAL_BIT                         0x00010000
  102. #define GL_LIST_BIT                         0x00020000
  103. #define GL_TEXTURE_BIT                      0x00040000
  104. #define GL_SCISSOR_BIT                      0x00080000
  105. #define GL_ALL_ATTRIB_BITS                  0x000fffff
  106.  
  107. /* BeginMode */
  108. #define GL_POINTS                           0x0000
  109. #define GL_LINES                            0x0001
  110. #define GL_LINE_LOOP                        0x0002
  111. #define GL_LINE_STRIP                       0x0003
  112. #define GL_TRIANGLES                        0x0004
  113. #define GL_TRIANGLE_STRIP                   0x0005
  114. #define GL_TRIANGLE_FAN                     0x0006
  115. #define GL_QUADS                            0x0007
  116. #define GL_QUAD_STRIP                       0x0008
  117. #define GL_POLYGON                          0x0009
  118.  
  119. /* BlendingFactorDest */
  120. #define GL_ZERO                             0
  121. #define GL_ONE                              1
  122. #define GL_SRC_COLOR                        0x0300
  123. #define GL_ONE_MINUS_SRC_COLOR              0x0301
  124. #define GL_SRC_ALPHA                        0x0302
  125. #define GL_ONE_MINUS_SRC_ALPHA              0x0303
  126. #define GL_DST_ALPHA                        0x0304
  127. #define GL_ONE_MINUS_DST_ALPHA              0x0305
  128.  
  129. /* BlendingFactorSrc */
  130. /*      GL_ZERO */
  131. /*      GL_ONE */
  132. #define GL_DST_COLOR                        0x0306
  133. #define GL_ONE_MINUS_DST_COLOR              0x0307
  134. #define GL_SRC_ALPHA_SATURATE               0x0308
  135. /*      GL_SRC_ALPHA */
  136. /*      GL_ONE_MINUS_SRC_ALPHA */
  137. /*      GL_DST_ALPHA */
  138. /*      GL_ONE_MINUS_DST_ALPHA */
  139.  
  140. /* Boolean */
  141. #define GL_TRUE                             1
  142. #define GL_FALSE                            0
  143.  
  144. /* ClearBufferMask */
  145. /*      GL_COLOR_BUFFER_BIT */
  146. /*      GL_ACCUM_BUFFER_BIT */
  147. /*      GL_STENCIL_BUFFER_BIT */
  148. /*      GL_DEPTH_BUFFER_BIT */
  149.  
  150. /* ClipPlaneName */
  151. #define GL_CLIP_PLANE0                      0x3000
  152. #define GL_CLIP_PLANE1                      0x3001
  153. #define GL_CLIP_PLANE2                      0x3002
  154. #define GL_CLIP_PLANE3                      0x3003
  155. #define GL_CLIP_PLANE4                      0x3004
  156. #define GL_CLIP_PLANE5                      0x3005
  157.  
  158. /* ColorMaterialFace */
  159. /*      GL_FRONT */
  160. /*      GL_BACK */
  161. /*      GL_FRONT_AND_BACK */
  162.  
  163. /* ColorMaterialParameter */
  164. /*      GL_AMBIENT */
  165. /*      GL_DIFFUSE */
  166. /*      GL_SPECULAR */
  167. /*      GL_EMISSION */
  168. /*      GL_AMBIENT_AND_DIFFUSE */
  169.  
  170. /* CullFaceMode */
  171. /*      GL_FRONT */
  172. /*      GL_BACK */
  173. /*      GL_FRONT_AND_BACK */
  174.  
  175. /* DepthFunction */
  176. /*      GL_NEVER */
  177. /*      GL_LESS */
  178. /*      GL_EQUAL */
  179. /*      GL_LEQUAL */
  180. /*      GL_GREATER */
  181. /*      GL_NOTEQUAL */
  182. /*      GL_GEQUAL */
  183. /*      GL_ALWAYS */
  184.  
  185. /* DrawBufferMode */
  186. #define GL_NONE                             0
  187. #define GL_FRONT_LEFT                       0x0400
  188. #define GL_FRONT_RIGHT                      0x0401
  189. #define GL_BACK_LEFT                        0x0402
  190. #define GL_BACK_RIGHT                       0x0403
  191. #define GL_FRONT                            0x0404
  192. #define GL_BACK                             0x0405
  193. #define GL_LEFT                             0x0406
  194. #define GL_RIGHT                            0x0407
  195. #define GL_FRONT_AND_BACK                   0x0408
  196. #define GL_AUX0                             0x0409
  197. #define GL_AUX1                             0x040A
  198. #define GL_AUX2                             0x040B
  199. #define GL_AUX3                             0x040C
  200.  
  201. /* Enable */
  202. /*      GL_FOG */
  203. /*      GL_LIGHTING */
  204. /*      GL_TEXTURE_1D */
  205. /*      GL_TEXTURE_2D */
  206. /*      GL_LINE_STIPPLE */
  207. /*      GL_POLYGON_STIPPLE */
  208. /*      GL_CULL_FACE */
  209. /*      GL_ALPHA_TEST */
  210. /*      GL_BLEND */
  211. /*      GL_LOGIC_OP */
  212. /*      GL_DITHER */
  213. /*      GL_STENCIL_TEST */
  214. /*      GL_DEPTH_TEST */
  215. /*      GL_CLIP_PLANE0 */
  216. /*      GL_CLIP_PLANE1 */
  217. /*      GL_CLIP_PLANE2 */
  218. /*      GL_CLIP_PLANE3 */
  219. /*      GL_CLIP_PLANE4 */
  220. /*      GL_CLIP_PLANE5 */
  221. /*      GL_LIGHT0 */
  222. /*      GL_LIGHT1 */
  223. /*      GL_LIGHT2 */
  224. /*      GL_LIGHT3 */
  225. /*      GL_LIGHT4 */
  226. /*      GL_LIGHT5 */
  227. /*      GL_LIGHT6 */
  228. /*      GL_LIGHT7 */
  229. /*      GL_TEXTURE_GEN_S */
  230. /*      GL_TEXTURE_GEN_T */
  231. /*      GL_TEXTURE_GEN_R */
  232. /*      GL_TEXTURE_GEN_Q */
  233. /*      GL_MAP1_VERTEX_3 */
  234. /*      GL_MAP1_VERTEX_4 */
  235. /*      GL_MAP1_COLOR_4 */
  236. /*      GL_MAP1_INDEX */
  237. /*      GL_MAP1_NORMAL */
  238. /*      GL_MAP1_TEXTURE_COORD_1 */
  239. /*      GL_MAP1_TEXTURE_COORD_2 */
  240. /*      GL_MAP1_TEXTURE_COORD_3 */
  241. /*      GL_MAP1_TEXTURE_COORD_4 */
  242. /*      GL_MAP2_VERTEX_3 */
  243. /*      GL_MAP2_VERTEX_4 */
  244. /*      GL_MAP2_COLOR_4 */
  245. /*      GL_MAP2_INDEX */
  246. /*      GL_MAP2_NORMAL */
  247. /*      GL_MAP2_TEXTURE_COORD_1 */
  248. /*      GL_MAP2_TEXTURE_COORD_2 */
  249. /*      GL_MAP2_TEXTURE_COORD